const app = getApp();

Page({

  /**
   * 页面的初始数据
   */
  data: {
    userInfo: app.globalData.userInfo,   
    navHeight: app.globalData.navHeight,
    capsule: app.globalData.capsule, 
    top20User:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    this.getFriends();
  },
  getFriends() {  
    wx.cloud.callFunction({
      name: 'user',
      data:{
        op:'getTop20Users'
      }
    }).then(res => {
      console.log('top20User', res)
      this.setData({
        top20User:res.result
          })
    })

  },
  


})